<!DOCTYPE html>
<html>
<head>
	<title>页面加载</title>
	<script type="text/javascript">
	
		window.onload = function() {
			var h1 = document.getElementById('app');
			console.log(h1);
		}
		/* 浏览器关闭

			1. 不能使用弹出框
		*/
		window.onunload = function() {
			console.log('close');
		}

	</script>
</head>
<body>
	<div id='app'></div>
<script type="text/javascript">
</script>
</body>
</html>